﻿@using SlamDunk.CMS.BLL
@using SlamDunk.CMS.Model
@using SlamDunk.CMS.Model.DataModel
@using SlamDunk.CMS.Model.ViewModel
@{
    //实例化业务层
    ArticleBll articleBll = new ArticleBll();
    ChannelBll channelBll = new ChannelBll();
    LinkBll linkBll = new LinkBll();
    //获取招生计划相关
    ArticleViewForRead enrollment = articleBll.GetModelList(26).FirstOrDefault() == null ? new ArticleViewForRead() : articleBll.GetModelList(26).FirstOrDefault().ToViewModel();
    Channel recruitInfo = channelBll.GetModel(25);
    Link schlRecruitLink = linkBll.GetModelList(11).FirstOrDefault() == null ? new Link() : linkBll.GetModelList(11).FirstOrDefault();
    //获取热点问题解答
    List<ArticleViewForRead> hotQList = articleBll.GetModelList(23, 6).Select(x => x.ToViewModel()).ToList();
    Channel currentChannel = new Channel();
    if (hotQList.Count > 0)
    {
        currentChannel = hotQList[0].Channel;
    }

}
<div class="SubMid_L">
    <!--招生计划-->
    <ul class="SubMid_L1">
        <li class="SubMid_L11"><a href="@recruitInfo.GetUrl()"></a></li>
        <li class="SubMid_L12"><a href="@enrollment.Url"></a></li>
        <li class="SubMid_L13"><a href="@schlRecruitLink.Url"></a></li>
        <li class="SubMid_L14"><a href="/Html/ScoreLine/Index.html"></a></li>
    </ul>
    <!--热点问题解答-->
    <div class="SubMid_L2">
        <div class="SubMid_L2_tit"><span class="SubMid_L2_tit1">@currentChannel.ChannelName</span><a href="@currentChannel.GetUrl()" class="Mid_R4_tit3">more</a></div>
        <div class="SubMid_L2_txtcon">
            <ul class="SubMid_L2_txt">
                @foreach (ArticleViewForRead article in hotQList)
                {
                    <li><a href="@article.Url">@article.Title</a></li>
                }
            </ul>
        </div>
    </div>
</div>
